<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<!-- ================================================= -->
<!-- === This Code breaks the Sharing widget ========= -->
<!-- ================================================= -->
	<script type="text/javascript">
// 		document.domain = "fds.com";
	</script>

	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Macy's/Jinrain widgets</title>

<!-- =========================================================== -->
<!-- ===== Starts the Sign in Widget============================ -->
<!-- =========================================================== -->
	<script type="text/javascript">

	(function() {
	    if (typeof window.janrain !== 'object') window.janrain = {};
	    window.janrain.settings = {};
	    
	    janrain.settings.tokenUrl = 'http://ldhostmacys.fds.com:8080/widget';
	
	    function isReady() { janrain.ready = true; };
	    if (document.addEventListener) {
	      document.addEventListener("DOMContentLoaded", isReady, false);
	    } else {
	      window.attachEvent('onload', isReady);
	    }
	
	    var e = document.createElement('script');
	    e.type = 'text/javascript';
	    e.id = 'janrainAuthWidget';
	
	    if (document.location.protocol === 'https:') {
	      e.src = 'https://rpxnow.com/js/lib/macys/engage.js';
	    } else {
	      e.src = 'http://widget-cdn.rpxnow.com/js/lib/macys/engage.js';
	    }
	
	    var s = document.getElementsByTagName('script')[0];
	    s.parentNode.insertBefore(e, s);
	})();
	</script>
<!-- =========================================================== -->
<!-- =========================================================== -->

</head>
<body>
	<jsp:directive.include file="/gHeader.jsp" />
	<div class="body" style="border:solid 3px #CCC;">

<!-- =========================================================== -->
<!-- ===== The body of the Sign in Widget ====================== -->
<!-- =========================================================== -->
		<div id="janrainEngageEmbed"></div>
<!-- =========================================================== -->

		<br />
		<br />
		<hr />
		<br />

		<div>
<!-- =========================================================== -->
<!-- ===== Sharing Widget Stuff ================================ -->
<!-- =========================================================== -->
			<script type="text/javascript">
				var rpxJsHost = (("https:" == document.location.protocol) ? "https://" : "http://static.");
				document.write(unescape("%3Cscript src='" + rpxJsHost + "rpxnow.com/js/lib/rpx.js' type='text/javascript'%3E%3C/script%3E"));
			</script>
			
			<script type="text/javascript">
				RPXNOW.init({appId: 'khnaholibicifkbkmgec',
				  xdReceiver: '/rpx_xdcomm.html'});
			</script>

			<script type="text/javascript">
			function initActivity(){
				RPXNOW.loadAndRun(['Social'], function () {
				    var activity = new RPXNOW.Social.Activity(
				       "Share your comment",
				       "Vote on my pool",
				       "http://www1.macys.com/shop/product/r-m-richards-dress-cap-sleeve-cocktail-dress?ID=504893&CategoryID=5449&LinkType=PDPZ1");
				    
				    activity.setTitle("This is the title");
				    activity.setDescription("This is the description");
				    activity.setUserGeneratedContent("This is the user generated content.");
				    activity.addActionLink("add Link Macys", "http://www.macys.com");
				    activity.addLinkProperty("Product Image", "This is a great product descripion", "http://slimages.macys.com/is/image/MCY/products/0/optimized/421440_fpx.tif?bgc=255,255,255&wid=100&qlt=90,0&layer=comp&op_sharpen=0&resMode=bicub&op_usm=0.7,1.0,0.5,0&fmt=jpeg");

				    var imageCollection = new RPXNOW.Social.ImageMediaCollection();

				    imageCollection.addImage(
				            "http://slimages.macys.com/is/image/MCY/products/0/optimized/421440_fpx.tif?bgc=255,255,255&wid=100&qlt=90,0&layer=comp&op_sharpen=0&resMode=bicub&op_usm=0.7,1.0,0.5,0&fmt=jpeg",
				            "http://www1.macys.com/shop/product/r-m-richards-dress-cap-sleeve-cocktail-dress?ID=504893&CategoryID=5449&LinkType=PDPZ1"
				    		);
				    
					activity.setMediaItem(imageCollection);
				    
				    RPXNOW.Social.publishActivity(activity, {
				    											prependName: false
				    										});
				  });
			}
			</script>
<!-- =========================================================== -->
<!-- =========================================================== -->

		</div>
	
		<div>
			<input type="button" onClick="initActivity();" value="Share your comment">
		</div>
	
	</div>
	<jsp:directive.include file="/gFooter.jsp" />
</body>
</html>